import { createRouter, createWebHashHistory } from 'vue-router'
// import HomeView from '../views/HomeView.vue'
import login from '../views/login/login.vue'
import odredbody from '@/views/my/odred/odredbody.vue'
import home from '../views/home/index.vue'
import productCate from '../views/class/productCate.vue'
import searchGoods from '../views/home/searchGoods.vue'
const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [

    {path:'/',redirect:'/login'},
    {path:"/home" ,component:home},
    {
      path: '/discount',
      component: () => import('../views/home/discount.vue')
    },
    {
      path: '/search',
      component: () => import('../views/home/search.vue')
    },
    {
      path: '/searchGoods',
      component: searchGoods
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/notlog',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/login/notlog.vue')
    },
    {
      path: '/newtip',
      component: () => import('../views/login/newtip.vue')
    },
    {
      path: '/info',
      component: () => import('../views/login/info.vue')
    },
    {
      path: '/addr',
      component: () => import('../views/login/addr.vue')
    },
    {
      path:'/productCate',component:productCate
       },
       {
       path:"/shopList",component:()=>import('../views/class/shopList.vue')
      },
       {
       path:"/shoppingDetail",component:()=>import('../views/class/shoppingDetail(1).vue')
       },
       {
       path:"/userComent",component:()=>import('../views/class/userComent.vue')
       },
          //地址
        {
            path:'/address',
            component:()=> import('@/views/my/tool/address/index.vue'),
         },
          //修改地址
          {path:'/EditAddress',name:'edit',component:()=>import('../views/my/tool/address/add/index.vue')},
          {path:'/chat',component:()=>import('@/views/my/tool/ServiceChat/index.vue')},
          //
          //常用功能
          {path:'/AttentionStore',name:'收藏夹',component:() => import ('@/views/my/CommonlyUsed/AttentionStore.vue')},
          {path:'/coupon',name:'卡卷',component:() => import ('@/views/my/CommonlyUsed/coupon.vue')},
          {path:'/favorites',name:'足迹',component:() => import ('@/views/my/CommonlyUsed/favorites.vue')},
          {path:'/footprint',name:'关注店铺',component:() => import ('@/views/my/CommonlyUsed/footprint.vue')},
          //常用工具
          {path:'/BroughtVolume',name:'领卷中心',component:()=> import('@/views/my/tool/BroughtVolume/index.vue')},
          {path:'/ServiceChat',name:'客服消息',component:()=> import('@/views/my/tool/ServiceChat/index.vue')},
         {path:'/SignCenter',name:'签到中心',component:()=>import('@/views/my/tool/SignCenter/index.vue')},
         {path:'/StoresLive',name:'直播',component:()=>import('@/views/my/tool/StoresLive/index.vue')},
         {path:'/StoresLivePage',name:'直播页面',component:()=>import('@/views/my/tool/StoresLive/LivePage/index.vue')},

          //购物车
          {
            path:'/shoppingCart',
            component:()=>import('@/views/shoppingCart/index.vue')
          },
          {
            path:'/settleaccounts',
            component:()=>import('@/views/shoppingCart/settleaccounts.vue')
          },
          {
            path:'/successful',
            component:()=>import('@/views/shoppingCart/successful.vue')
          },
          {
            path:'/failure',
            component:()=>import('@/views/shoppingCart/failure.vue')
          },


    //我的订单页面
    {
      path: '/odredbody',
      component:odredbody
    },
    //物流详情
    {
      path: '/logistics',
      name: 'logistics',
      component: () => import('@/views/my/odred/logisticsbox/logistics.vue')
    },
    //申请售后
    {path: '/AfterSales',name: 'AfterSales',component: () => import('@/views/my/odred/AfterSalesbox/AfterSales.vue'),},
    {path: '/program1',component: () => import('@/views/my/odred/AfterSalesbox/program1/program1.vue')},
    {path: '/program2',component: () => import('@/views/my/odred/AfterSalesbox/program2/program2.vue')},
    {path: '/program3',component: () => import('@/views/my/odred/AfterSalesbox/program3/program3.vue')},
    {path: '/details1',component: () => import('@/views/my/odred/AfterSalesbox/program1/details1.vue')},
    {path: '/details2',component: () => import('@/views/my/odred/AfterSalesbox/program2/details2.vue')},
    {path: '/details3',component: () => import('@/views/my/odred/AfterSalesbox/program3/details3.vue')},
    //订单详情
    {path: '/detailsbody1',name: '全部',component: () => import('@/views/my/odred/details/body1.vue')},
    {path: '/detailsbody2',name: '待付款',component: () => import('@/views/my/odred/details/body2.vue')},
    {path: '/detailsbody3',name: '待发货',component: () => import('@/views/my/odred/details/body3.vue')},
    {path: '/detailsbody4',name: '待收货',component: () => import('@/views/my/odred/details/body4.vue')},
    {path: '/detailsbody5',name: '待评价',component: () => import('@/views/my/odred/details/body5.vue')},
    //评价
    {path: '/evaluation',name: '评价中',component: () => import('@/views/my/odred/logisticsbox/evaluation.vue')},
    //我的未登录
    {path: '/NotLogged',name: '评价中',component: () => import('@/views/my/odred/NotLogged.vue')},
    //已登录
  { path:'/mypage',component:()=> import ('../views/my/MyPage/Isloggedin/index.vue')},


  //信息
  {path:'/notLogged',component:()=>import('@/views/message/notLogged.vue'),name:'notLogged',meta:{name:'未登录'}},
    {path:'/messageList',component:()=>import('@/views/message/theMessageList/messageList.vue'),name:'messgeList',meta:{name:'消息列表'}},
    {path:'/logisticsInformation',component:()=>import('@/views/message/theMessageList/logisticsInformation.vue'),name:'logisticsInformation',meta:{name:'物流消息'}},
    {path:'/chatScreen',component:()=>import('@/views/message/theMessageList/chatScreen.vue'),name:'chatScreen',meta:{name:'聊天界面'}},
    {path:'/notificationMessage',component:()=>import('@/views/message/theMessageList/notificationMessage.vue'),name:'notificationMessage',meta:{name:'通知消息'}},
    {path:'/interactiveMessage',component:()=>import('@/views/message/theMessageList/interactiveMessage.vue'),name:'interactiveMessage',meta:{name:'互动消息'}},
    {path:'/informManagement',component:()=>import('@/views/message/theMessageList/informManagement.vue'),name:'informManagement',meta:{name:'通知管理'}},


    //设置
    {path:'/setUp',component:()=>import('@/views/setUp/index.vue'),name:'设置'},
    {path:'/personalInformationEditing',component:()=>import('@/views/setUp/personalInformationEditing.vue'),name:'personalInformationEditing',meta:{name:'编辑'}},
    {path:'/mobilePhoneNumberModification',component:()=>import('@/views/setUp/mobilePhoneNumberModification.vue'),name:'mobilePhoneNumberModification',meta:{name:'手机号修改'}},
    {path:'/phoneVoice',component:()=>import('@/views/setUp/phoneVoice.vue'),name:'Voice',meta:{name:'声音与通知'}},
    {path:'/general',component:()=>import('@/views/setUp/general.vue'),name:'general',meta:{name:'通用'}},
    {path:'/privacyPolicy',component:()=>import('@/views/setUp/privacyPolicy.vue'),name:'privacyPolicy',meta:{name:'隐私条款'}},
    //
  ]
})

export default router
